﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
using System.Data;
using System.Data.OleDb;
namespace WindowsFormsApplication3.Transaction
{
    class MerchandisingTransaction
    {
        public void insertmerchandisedata(ArrayList arrylst)
        {
         //   try
         //   {
                OleDbConnection con = new OleDbConnection(Program.ConnStr);
                con.Open();
                OleDbCommand cmd = new OleDbCommand("insert into tbl_merchandisingmaster(enqdate,via ,totype ,forreson,contactame ,remark ,contactime)" +
                    "values (@penqdate ,@pvia ,@ptotype ,@pforreson ,@pcontactame ,@premark,@pcontactime )", con);
               cmd.Parameters.AddWithValue("@penqdate", arrylst[0]);
                cmd.Parameters.AddWithValue("@pvia", arrylst[1]);
                cmd.Parameters.AddWithValue("@ptotype", arrylst[2]);
                cmd.Parameters.AddWithValue("@pforreson", arrylst[3]);
                cmd.Parameters.AddWithValue("@pcontactame", arrylst[4]);
                cmd.Parameters.AddWithValue("@premark", arrylst[5]);
                cmd.Parameters.AddWithValue("@pcontactime", arrylst[6]);
                cmd.ExecuteNonQuery();
                con.Close();
            }
         //   catch (Exception)
           // {
                
           //     throw;
           // }
           

      //  }
    }
}
